@charset "utf-8";

@import "module/var";
@import "module/normalize";

$basic-transition-time: 0.4s;
$sidebar-font-color: rgba(255, 255, 255, 0.8);

.list-unstyled {
  padding: 0;
  list-style: none;
}

.hidden-xs {
  @media (max-width: 767px) {
    display: none !important;
  }
}

html {
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  height: 100%;
  background: #3e3e3e url(../images/home-bg-xs.jpg) no-repeat 50% 50%;
  background-size: cover;
  font-family: '宋体', "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
  font-size: 14px;

  @media (min-width: 768px) {
    background-image: url(../images/home-bg.jpg);
  }

  @media (min-width: $screen-xlg) {
    font-size: 16px;
  }
}

#masthead {
  overflow: hidden;
}

#home-head {
  margin-top: 20px;
  margin-left: 20px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 30px;

  @media (max-width: 767px) {
    margin-top: 10px;
    margin-left: 10px;
  }

  br {
    @media (max-width: 767px) and (orientation: portrait) {
      display: none;
    }
  }
}

#logo {
  margin-right: 5px;
  width: 25px;
  vertical-align: middle;
}

#home-content {
  position: absolute;
  top: 45%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  color: rgba(255, 255, 255, .9);
  font-size: 18px;

  p {
    line-height: 30px;
  }

  p:first-child {
    margin-left: -45px;
  }

  p:last-child {
    margin-right: -45px;
  }
}

#sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100vh;
  color: $sidebar-font-color;
}

#site-nav {
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  margin-left: 20px;
  line-height: 30px;
  white-space: nowrap;

  li {
    margin-top: 10px;
    margin-bottom: 10px;
  }

  a {
    display: block;
    border-bottom: 1px solid transparent;
    -webkit-transition: border $basic-transition-time;
    -moz-transition: border $basic-transition-time;
    -ms-transition: border $basic-transition-time;
    -o-transition: border $basic-transition-time;
    transition: border $basic-transition-time;
  }

  a:hover,
  li.active a {
    text-decoration: none;
    border-bottom: 1px solid $sidebar-font-color;
  }

  @media (max-width: 767px) and (orientation: portrait) {
    position: relative;
    top: 50px;
    margin-left: 0;
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
    transform: translateY(0);

    ul {
      width: 100vw;
      display: table;
      table-layout: fixed;
    }

    li {
      display: table-cell;
      text-align: center;
    }

    li.active a,
    a:hover {
      border-bottom: none;
    }
  }
}

#mastfoot {
  position: absolute;
  left: 50%;
  bottom: 10px;
  -webkit-transform: translateX(-50%);
  -moz-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  -o-transform: translateX(-50%);
  transform: translateX(-50%);
  font-size: 12px;
  color: #c9c9c9;
  line-height: 20px;
  white-space: nowrap;

  a {
    text-decoration: underline;
  }
}

#image-source {
  display: block;
  position: absolute;
  bottom: 12px;
  right: 20px;
  width: 15px;
  height: 15px;
  line-height: 15px;
  text-align: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, .2);
  font-size: 12px;
  color: #c9c9c9;

  &,
  &::before {
    -webkit-transition: all .4s;
    -moz-transition: all .4s;
    -ms-transition: all .4s;
    -o-transition: all .4s;
    transition: all .4s;
  }

  &:hover,
  &::before {
    background-color: rgba(255, 255, 255, .8);
    color: #666;
  }

  &.align-left::before {
    left: 0;
  }

  &.align-right::before {
    right: 0;
  }

  &::before {
    content: attr(data-content);
    display: block;
    position: absolute;
    top: -20px;
    padding: 4px 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
  }

  &:hover {
    text-decoration: none;

    &::before {
      top: -30px;
      opacity: 1;
      visibility: visible;
    }
  }
}
